#!/usr/bin/env python
#coding=utf-8

#main method
import simulateDatabase.Database
import excute

if __name__ == '__main__':
	###############################################################################
	#simulate database
	print "database initiating..."
	database = simulateDatabase.Database.Connect()

	excute.importData()
	while 1:
		inputData = raw_input("Please input the filename of fig that you want to extract the keyword(Input \"end\" to quit)\n")
		if inputData == "end":
			break
		else:
			excute.mainMethod(inputData, database)


#end